import usercenterRequest from '@/api/service/usercenter';

// 部门管理 - 部门管理列表集合查询
export const getDepartAuthService = (data, loadingFn) => usercenterRequest.retRequest({
  url: '/usercenter/web/departmentAuth/getDepartAuth',
  type: 'post',
  data,
  loadingFn
});

// 部门管理 - 品类授权
export const authService = (data, loadingFn) => usercenterRequest.request({
  url: '/usercenter/web/departmentAuth/auth',
  type: 'post',
  data,
  loadingFn
});

// 部门管理 - 获取部门授权详情
export const getDepartmentAuthDetailService = (data, target) => usercenterRequest.retRequest({
  url: '/usercenter/web/departmentAuth/getDepartmentAuthDetail',
  type: 'get',
  data,
  target
});

// 部门管理 - 保存部门序列
export const saveDepartmentSequenceService = (data, loadingFn) => usercenterRequest.request({
  url: '/usercenter/web/departmentAuth/saveDepartmentSequence',
  type: 'post',
  data,
  loadingFn
});

// 商品负责人编辑页 - 根据等级查分类
export const getCategoryListService = (data, target) => usercenterRequest.retRequest({
  url: '/usercenter/web/product/duty/categoryList',
  type: 'get',
  data,
  target
})

// 商品负责人编辑页 - 根据词条查询品牌
export const getBrandListService = (data, target) => usercenterRequest.retRequest({
  url: '/usercenter/web/product/duty/brandList',
  type: 'get',
  data,
  target
})

// 商品负责人编辑页 - 人员列表
export const getPersonListService = (data, target) => usercenterRequest.retRequest({
  url: '/usercenter/web/product/duty/personList',
  type: 'get',
  data,
  target
})

// 商品负责人编辑页 - 绑定商品负责人
export const addPersonsService = (data, loadingFn) => usercenterRequest.request({
  url: '/usercenter/web/product/duty/addPersons',
  type: 'post',
  data,
  loadingFn
})

// 商品负责人编辑页 - 获取商品负责人详情
export const getPersonDetailService = (data, target) => usercenterRequest.retRequest({
  url: '/usercenter/web/product/duty/dutyPersonDetail',
  type: 'get',
  data,
  target
})
